<template>
<uni-shadow-root class="partials-gridlist-gridlist"><import src="simpleGridlist.wxml"></import>  
<import src="second_navigation_with_shadow/second_navigation_with_shadow.wxml"></import>  
<import src="vertical_column_navigation/index.wxml"></import>  
<import src="slide_navigation/index.wxml"></import>  
   
<block v-if="data.androidTemplate == """>
    <template is="simpleGridlist" :data="...data"></template> 
</block>
     
<block v-if="data.androidTemplate == "second_navigation_with_shadow"">
    <template is="second_navigation_with_shadow" :data="...data"></template> 
</block>

<block v-if="data.androidTemplate == "vertical_column_navigation"">
    <template is="vertical_column_navigation" :data="...data,listData"></template> 
</block>

<block v-if="data.androidTemplate == "slide_navigation"">
    <template is="slideNavigation" :data="...data"></template> 
</block></uni-shadow-root>
</template>

<script>

global['__wxRoute'] = 'partials/gridlist/gridlist'
const app = getApp();
Component({
  properties: {
    data: {
      type: JSON,
      value: 'default value',
    }
  },
  data: {
    someData: {},
    listData: {
      cells: [
        {
          iconPath: "https://image1.sansancloud.com/xianhua/2019_3/27/15/37/19_117.jpg?x-oss-process=style/preview_120",
          linkUrl: "address.html",
          text: "收货地址",
          color: "#777777"
        },
        {
          iconPath: "https://image1.sansancloud.com/xianhua/2019_3/27/15/37/19_432.jpg?x-oss-process=style/preview_120",
          linkUrl: "my_favorite.html",
          text: "我的收藏",
          color: "#777777"
        },
        {
          iconPath: "https://image1.sansancloud.com/xianhua/2019_3/27/15/37/19_434.jpg?x-oss-process=style/preview_120",
          linkUrl: "my_coupons.html",
          text: "优惠券",
          color: "#777777"
        },
        {
          iconPath: "https://image1.sansancloud.com/xianhua/2019_3/27/15/37/19_429.jpg?x-oss-process=style/preview_120",
          linkUrl: "",
          id: "1",
          text: "在线客服",
          color: "#777777"
        },
        {
          iconPath: "https://image1.sansancloud.com/xianhua/2019_3/27/15/37/19_420.jpg?x-oss-process=style/preview_120",
          linkUrl: "custom_page_my_newlist?pageNage=常见问题",
          text: "常见问题",
          color: "#777777"
        }
      ],
      column: 3,
      showType: 0
    },
  },
  ready: function () {
    let that = this;
    app.globalData.consoleFun("=====gridist组件-导航=====",[that.data.data])
  },
  methods: {
    tolinkUrl: function (event) {
    app.globalData.consoleFun("=====gridist组件-tolinkUrl=====",[event.currentTarget.dataset.link])
      app.globalData.linkEvent(event.currentTarget.dataset.link);
    }
  },
})
export default global['__wxComponents']['partials/gridlist/gridlist']
</script>
<style platform="mp-weixin">
@import 'second_navigation_with_shadow/second_navigation_with_shadow.css';/* 引入带有阴影的 */
@import 'vertical_column_navigation/index.css';/* 引入带有阴影的 */
.showTypeContainer{
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
  /* padding-top: 6px;
  padding-bottom: 17px; */
  padding: 20rpx 0rpx;
  box-sizing: border-box;
} 
.grid_cell{
  /* padding-top: 11px; */
  padding: 0rpx 20rpx 20rpx 20rpx;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.grid_cell_item{
  /* padding-top: 11px; */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.grid_cell image{
  width: 110rpx;
  height:110rpx;
}
.noCheck{
    margin-top: 20rpx;
    font-size: 12px;
    color: #666666;
}
/* .grid_cell view{
  color: #666666;
  font-size: 12px;
} */
.grid_cell button{
  margin-top: 4px;
  color: #666666;
  font-size: 12px;
  line-height: 17px;
}
/* 左右图标 */
.showTypeContainer_1{
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
  padding-bottom: 10px;
}
.grid_cell_1{
  margin-top: 15px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  font-size: xx-small;
}
/**第三种*/
.showTypeContainer3{
  width: 100%;
  height: 8em;
}
.showTypeContainer3 image{
  height: 95%;
  width: 95%;
}
.grid_cell3_1{
  float: left;
  width: 50%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.grid_cell3_2{
  float: right;
  width: 50%;
  height: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}
/* 左字右图 */
.grid_cell_block{
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    border-right: 1rpx solid #EAEAEA;
    border-left: 1rpx solid #EAEAEA;
    border-top: 1rpx solid #EAEAEA;
}
.grid_cell_two{
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.grid_cell_two:nth-child(odd){
  border-right: 1rpx solid #EAEAEA;
  border-bottom: 1rpx solid #EAEAEA;
}
.grid_cell_two:nth-child(even){
  border-bottom: 1rpx solid #EAEAEA;
}
.grid_cell_item_two{
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 30rpx 20rpx;
  box-sizing: border-box;
}
.grid_cell_item_text_two{
    font-size: 32rpx;
    display: flex;
    color: #333;
    flex-direction: column;
    align-items: flex-start;
    width: 50%;
}
.text_short{
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    width: 100%;
}
@import 'slide_navigation/index.css';
</style>